package cn.maidouya.pet.domain;

import cn.maidouya.basic.domain.BaseDomain;
import cn.maidouya.org.domain.Shop;
import cn.maidouya.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.util.StringUtils;

import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Pet extends BaseDomain {
    private String name;
    private BigDecimal saleprice;
    private BigDecimal costprice;
    private String resources;
    // 状态：0下架 1上架
    private Integer state= 0;
    // 宠物类型和id
    private Long type_id;
    private PetType type;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createtime = new Date();

    // 店铺Id 如果被领养店铺id为null
    private Long shop_id;
    private Shop shop;

    // 如果被领养为领养用户id
    private Long user_id;
    private User user;

    // 宠物详情页
    private Long search_master_msg_id;
    private PetDetail detail = new PetDetail();

    private Integer payType = 0;
}